<?php
$CI  = & get_instance();
$CI->load->model('Model_product', 'model_product');
$media_thumb = $CI->config->item("media_thumb");
?>
<div class="one-col">
	<?php
		$t1 = unserialize($content['t1']);
		$product_rand = $CI->model_product->fetch_rand($t1['quantity']);
	?>
	<h1 style="display:none;"><?= htmlspecialchars($content['title'])?></h1>
	<div id="chained" style="text-align:center;">		
		<!--h2><?=$content['title']?></h2-->		
		<ul class="items">
			<?php if(!empty($product_rand)):?>
			<?php foreach($product_rand as $item):?>
			<li class="item">
				<a href="<?=site_url(array('c' => 'home', 'm' => 'index', 'nav' => '2', 'url' => 'skin-laptop'))?>" title="<?=$item['title']?>">
					<img src="<?=$media_thumb['user_media_url'].$item['rawname'].$item["fileext"]?>" alt="<?=$item['title']?>">
				</a>				
				<p><?=$item['description']?></p>
			</li>
			<?php endforeach;?>
		</ul>
		<?php endif;?>
	</div>
</div>
<?php if(count($product_rand) > 1):?>
<script type="text/javascript">
$(function(){
	$("#chained").scrollable({size: 1, circular: true, mousewheel: true}).autoscroll({interval: 5000});
})
</script>
<?php endif;?>